<#macro dcView _ck _sy _jy >  
	存柜:<select name="ck" >
        	<option selected="selected">${_ck}</option>
        </select>
	剩余:<select name="sy">
  	  		<option>${_sy}</option>
        </select>  
	<#if borrowPopup??>
    	<#if bid??>
        	<#assign count="${_sy?number + _jy?number}"/>
        <#else>
       		<#assign count="${_sy}"/>
        </#if>
                               我要借阅:<select name="jy">
          	     <#list 0..count?number as i> 
            		<#if bid?? && _jy ==i >
            			<option selected="selected">${i}</option>
            		<#else>
            			<option>${i}</option>
            		</#if>
            	</#list>
          	 </select> 
           </td>
	<#else>
                已借阅:<select name="jy">
      	     <option>${_jy}</option>
      	 </select> 
	</#if>
</#macro>  


<div class="cktitle"><span class="xiala"></span>财务行归档</div>
   <div class="m10 detaiTab" style="border-right:1px solid #e1e1e1; border-left:1px solid #e1e1e1">
        <table data="${FORMTYPE_FINANCE}" width="100%" border="0" cellspacing="0" cellpadding="0" class="b_t_e5">
            <tbody>
               <#list 0..(financeFields?size/2)?ceiling-1 as x> 
            	 	<tr>
            	 		<#list 0..1 as index> 
                	 		<#if financeFields[x*2+index]??>
	                            <td align="right" class="bg " width="15%"><span><font color="red">*</font></span>${financeFields[x*2+index].fieldName}</td>
	                            <td width="40%" class="fieldVaule" data="${financeFields[x*2+index].fieldName}">
	                                               存柜:<select name="ck">
	                          	    <option>请选择</option>
	                            	<#list financeFields[x*2+index].fieldMin..financeFields[x*2+index].fieldMax as i> 
	                            		<#if financeFields[x*2+index].fieldValue?? && financeFields[x*2+index].fieldValue ==i >
	                            			<option selected="selected">${i}</option>
	                            		<#else>
	                            			<#if financeFields[x*2+index].fieldMin?? && financeFields[x*2+index].fieldMin ==i >
		                            			<option selected="selected">${i}</option>
		                            		<#else>
		                            			<option>${i}</option>
		                            		</#if>
	                            		</#if>
	                            	</#list>
	                            </select>
	                                                 剩余:<select name="sy">
	                          	  <option>${financeFields[x*2+index].beLeft}</option>
	                          	 </select>  
			                    <#if borrowPopup??>
	                          	  	<#if bid??>
				                    	<#assign count="${financeFields[x*2+index].beLeft?number + financeFields[x*2+index].lend?number}"/>
				                    <#else>
				                   		<#assign count="${financeFields[x*2+index].beLeft}"/>
				                    </#if>
			                                               我要借阅:<select name="jy">
			                          	     <#list 0..count?number as i> 
			                            		<#if bid?? && financeFields[x*2+index].lend?? && financeFields[x*2+index].lend ==i >
			                            			<option selected="selected">${i}</option>
			                            		<#else>
			                            			<option>${i}</option>
			                            		</#if>
			                            	</#list>
			                          	 </select> 
		                               </td>
		                    	<#else>
			                                              已借阅:<select name="jy">
			                          	     <option>${financeFields[x*2+index].lend}</option>
			                          	 </select> 
		                               </td>
		                    	</#if>	    	 
                	 		<#else>
                	 			<td align="right" class="bg" width="15%"></td>
	                            <td width="40%"></td>
                	 		</#if>
            	 		</#list>
                    </tr>
				</#list>
            </tbody>
        </table> 
    </div>
   <div class="cktitle"><span class="xiala"></span>存柜资料</div>
   <div class="m10 detaiTab" style="border-right:1px solid #e1e1e1; border-left:1px solid #e1e1e1">
        <table data="${FORMTYPE_ARCHIVE_INFO}" width="100%" border="0" cellspacing="0" cellpadding="0" class="b_t_e5">
            <tbody>
                <#list 0..(archiveFields?size/2)?ceiling-1 as x> 
            	 	<tr>
            	 		<#list 0..1 as index> 
                	 		<#if archiveFields[x*2+index]??>
	                            <td  width="15%" align="right" class="bg "><span><font color="red">*</font></span>${archiveFields[x*2+index].fieldName}</td>
	                            <td  width="40%" class="fieldVaule" data="${archiveFields[x*2+index].fieldName}">
	                            存柜:<select name="ck">
	                            	<option>请选择</option>
	                            	<#list archiveFields[x*2+index].fieldMin..archiveFields[x*2+index].fieldMax as i> 
	                            		<#if archiveFields[x*2+index].fieldValue?? && archiveFields[x*2+index].fieldValue ==i >
	                            			<option selected="selected">${i}</option>
	                            		<#else>
	                            			<#if archiveFields[x*2+index].fieldMin?? && archiveFields[x*2+index].fieldMin ==i >
		                            			<option selected="selected">${i}</option>
		                            		<#else>
		                            			<option>${i}</option>
		                            		</#if>
	                            		</#if>
	                            	</#list>
	                            </select>
	                                剩余:<select name="sy">
	                          	  <option>${archiveFields[x*2+index].beLeft}</option>
	                          	 </select>  
			                    <#if borrowPopup??>
			                    	<#if bid??>
				                    	<#assign count="${archiveFields[x*2+index].beLeft?number + archiveFields[x*2+index].lend?number}"/>
				                    <#else>
				                   		<#assign count="${archiveFields[x*2+index].beLeft}"/>
				                    </#if>
			                                               我要借阅:<select name="jy">
			                          	     <#list 0..count?number as i> 
			                            		<#if bid?? && archiveFields[x*2+index].lend?? && archiveFields[x*2+index].lend ==i >
			                            			<option selected="selected">${i}</option>
			                            		<#else>
			                            			<option>${i}</option>
			                            		</#if>
			                            	</#list>
			                          	 </select> 
		                               </td>
		                    	<#else>
			                                              已借阅:<select name="jy">
			                          	     <option>${archiveFields[x*2+index].lend}</option>
			                          	 </select> 
		                               </td>
		                    	</#if>	
	                         </td>
                	 		<#else>
                	 			<td width="15%" align="right" class="bg"></td>
	                            <td width="40%"></td>
                	 		</#if>
            	 		</#list>
                    </tr>
				</#list>
                <tr>
                 <td  width="15%" align="right" class="bg " ><span><font color="red">*</font></span>档案柜号</td>
                    <td width="40%"> <input id="archiveNoInpu" type="text" value="${archiveRecord.cabinetNo}" /></td>
                    <td width="15%" align="right" class="bg " ><span><font color="red">*</font></span>档案编号</td>
                    <td width="40%"> <input id="cabinetNoInpu" type="text" value="${archiveRecord.archiveNo}" /></td>
                </tr>
            </tbody>
        </table> 
    </div>
    
    <div class="cktitle"><span class="xiala"></span>代偿信息</div>
	   <div  class="m10 detaiTab" style="border-right:1px solid #e1e1e1; border-left:1px solid #e1e1e1">
	        <table id="dcInfoTable" width="100%" border="0" cellspacing="0" cellpadding="0" class="b_t_e5">
	            <tbody>
	                <tr>
	                    <td  width="15%" align="right" class="bg " ><span><font color="red">*</font></span>银行债权转让函</td>
	                    <td colspan="2" width="40%" data="dc_trans" class="dcField"> 
	                    	<@dcView _ck="${archiveBorrow.dc_trans_ck}" _sy="${archiveBorrow.dc_trans_sy}" _jy="${archiveBorrow.dc_trans_jy}"/>
	                    </td>
	                    <td  width="15%" align="right" class="bg " ><span><font color="red">*</font></span>EA代偿证明或国内支付业务收款回单</td>
	                    <td colspan="2" width="40%" data="dc_receipt" class="dcField">
	                    	<@dcView _ck="${archiveBorrow.dc_receipt_ck}" _sy="${archiveBorrow.dc_receipt_sy}" _jy="${archiveBorrow.dc_receipt_jy}"/>
	                    </td>
	                </tr>
	                 <tr>
	                    <td  width="15%" align="right" class="bg " ><span><font color="red">*</font></span>客户还款记录明细</td>
	                    <td colspan="2" width="40%" data="dc_refund" class="dcField">
	                    	<@dcView _ck="${archiveBorrow.dc_refund_ck}" _sy="${archiveBorrow.dc_refund_sy}" _jy="${archiveBorrow.dc_refund_jy}"/>
	                    </td>
	                    <td  width="15%" align="right" class="bg " ><span><font color="red">*</font></span>催收及资产转让通知函EMS快递单剩余</td>
	                    <td colspan="2" width="40%" data="dc_ems" class="dcField">
	                    	<@dcView _ck="${archiveBorrow.dc_ems_ck}" _sy="${archiveBorrow.dc_ems_sy}" _jy="${archiveBorrow.dc_ems_jy}"/>
	                    </td>
	                </tr>
	            </tbody>
	        </table> 
	    </div>
    
    <#if (nodeCode?? && (nodeCode=='JY_DAJC' || nodeCode=='JY_JCCJQR'))  ||  showSendInfo??>
      <form id="sendForm" action="/archive/rest/v1/saveSendBorrowInfo" class="action-ajax-form" >
       <input type="hidden" name="bid" value="${bid}"/>
	   <div class="cktitle"><span class="xiala"></span>寄出快递信息</div>
	   <div  class="m10 detaiTab" style="border-right:1px solid #e1e1e1; border-left:1px solid #e1e1e1">
	        <table data="${FORMTYPE_ARCHIVE_INFO}" width="100%" border="0" cellspacing="0" cellpadding="0" class="b_t_e5">
	            <tbody>
	                <tr>
	                    <td  width="15%" align="right" class="bg " ><span><font color="red">*</font></span>寄出时间</td>
	                    <td colspan="2" width="40%"> <@date id="send_time" name="send_time" value="${archiveBorrow.send_time}"/></td>
	                    <td  width="15%" align="right" class="bg " ><span><font color="red">*</font></span>快递公司</td>
	                    <td colspan="2" width="40%"> <input id="send_company" name="send_company" type="text" value="${archiveBorrow.send_company}" /></td>
	                </tr>
	                 <tr>
	                    <td  width="15%" align="right" class="bg " ><span><font color="red">*</font></span>快递单号</td>
	                    <td colspan="2" width="40%"> <input id="send_no" name="send_no" type="text" value="${archiveBorrow.send_no}" /></td>
	                    <td  width="15%" align="right" class="bg " ><span><font color="red">*</font></span>寄送凭证（快递单牌照）</td>
	                    <td colspan="2" width="40%"> <div class="openBox action-ajax-load" data-url="<@url value='/archive/rest/v1/fileDiv?loanapplyNo=${referId}&loanId=${loanId}&datalistType=GD_BORROW&hidenBtn=${hidenBtn}'/>" id="file_uploader"> </div></td>
	                </tr>
	            </tbody>
	        </table> 
	    </div>
	   </form>
    </#if>
<tr>
